﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SisLegal.Model
{
    public class Util
    {
       public const string CnnBDSystem = "Server=localhost;UID=roderick;PWD=roderick;Database=BDSystem";
       //public const string ConnKLegal = "Server=localhost;UID=roderick;PWD=roderick;Database=KLegal";
        public const string ConnKLegal = "Server=SQL5005.Smarterasp.net;UID=DB_9C4CD8_legal_admin;PWD=bk4cybertel;Database=DB_9C4CD8_legal";

       //public const string CnnBDSystem = "Server=192.168.50.10;UID=sisoper;PWD=sisoper;Database=BDSystem";
        //public const string Conexion = "Server=localhost;UID=sa;PWD=sa0;Database=BDSystem";
       //public const string ConnKLegal = "Server=192.168.50.10;UID=sisoper;PWD=sisoper;Database=KLegal";
    }

    public class Item
    {
        public int NumPage { get; set; }
    }

    public enum eTypeProcess
    {
        Civiles = 1,
        Laborales = 2,
        Contenciosos_Administrativos = 3,
        Arbitrales = 4,
        Penal = 5,
        Constitucionales = 6,
        Tributarios = 7
    }

    public enum eResultSentences
    {
        Sentencia_a_Favor = 1,
        Sentencia_en_Contra = 2
    }



    public enum eParticipation_Seal_Fiscal_Folder
    {
        Denunciante = 1,
        Agraviado = 2,
        Tercero_Civil = 3
    }

    public enum eMoney
    {

        Nuevo_Sol = 1,
        Dollar_USA = 2
    }

    public enum eType_Process_Fiscal_Folder
    {
        Comun = 1,
        Especial = 2,
        Procedimientos_Penal = 3
    }

    public enum eContingency_Rate
    {
        Probable = 1,
        Posible = 2,
        Remoto = 3
    }

    public enum eAssigned_Person
    {
        Gerencia_Asesoría_Legal = 1,
        Externo = 2
    }

    public enum ePhysical_Location_Files
    {
        Externo = 1,
        Gerencia_Asesoría_Legal = 2,
        Archivo_Gerencia_Asesoría_Legal = 3,
        Ramsa = 4,
        Otros = 5
    }

    public enum eFileLoad
    {
        Expediente_Principal = 1,
        Expediente_Secundary = 2,
        FiscalFolder_Principal = 3,
        FiscalFolder_Secundary = 4
    }
    //---------------------------------------------------------------------
    public static class Enumeration
    {
        public static IDictionary<int, string> GetAll<TEnum>() where TEnum : struct
        {
            var enumerationType = typeof(TEnum);

            if (!enumerationType.IsEnum)
                throw new ArgumentException("Enumeration error");

            var dictionary = new Dictionary<int, string>();

            foreach (int value in Enum.GetValues(enumerationType))
            {
                var name = Enum.GetName(enumerationType, value);
                dictionary.Add(value, name);
            }

            return dictionary;
        }
    }
}